package wsi.input;

import org.rygh.semantic.model.rdf.Fact;

import wsi.function.DirManager;

public abstract class TypeBasedSelector extends InputSelector {

	protected TypeBasedSelector(DirManager dir, boolean loadPrevious) {
		super(dir, loadPrevious);

		if (function.isDirect()) {
			this.type = function.getRuntimeInfo().getType();

			if (type == null) {
				log.info("[warn] missing input type for "
						+ function.getFullName());
			}

			assert namePredicate != null : function.getFullName();
		}
	}

	protected Fact getTypeFact() {
		return getTypeFact(type);
	}
}
